<?php
namespace API\Controller;
use Think\Controller;
class PrizeController extends Controller {
	//查看所有奖品信息接口
    public function getPrizes(){


        $prizes = M('prizes');
        $data = $prizes -> order("p_id")->select();

        echo json_encode($data);
         echo "<br>";

    }
    //查看奖品详情接口
    public function getPrizeById(){
   
        $p_id = $_GET['p_id'];
        $getPrizeById = M('prizes');
        $data = $getPrizeById -> where("p_id='$p_id'")-> select();

        echo json_encode($data);
         echo "<br>";
     }
}
?>
